<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    input{
        width: 150px;
        height: 30px;
        border-radius: 30px;
        background-color: #fff;
        appearance: none;
        border:1px solid #ccc;
        position: relative;
        transition:  1s;
        
    }
    input::after{
        content: "";
        display: block;
        position: absolute;
        top:0;
        left:0;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background-color: #ccc;
        transition:  1s;

    }
    input[type="checkbox"]:checked{
        background-color: aqua;
    }
    input[type="checkbox"]:checked::after{
        left:120px;
      


    }
    </style>
</head>
<body>
    <form action="">
       <input type="checkbox">
       <input type="checkbox">
       <input type="checkbox">
    </form>
</body>
</html>